import numpy as np

arr2d = np.array([
                  [1,2,3,4,5,6,7],
                  [8,9,10,11,12,13,14],
                  [15,16,17,18,19,20,21],
                  [22,23,24,25,26,27,28],
                  [29,30,31,32,33,34,35],
                ])
arr = arr2d>18
A = np.array([[1,2],
              [3,4]])
B = np.array([[5,6],
              [7,8]])
C = np.array([[1],
              [5],
              [9]])
D = np.array([2,4,9])
M = np.array([[1,2,3],[4,5,6]])
N = np.array([[7,8],[9,10],[11,12]])
print(arr2d[:3,:3])
print("~~~~~")
print(arr2d[1:4,2:5])
print("~~~~~")
print(arr2d[[2,1],[3,2]])
print("~~~~~")
print(arr2d[[2,1]])
print("~~~~~")
print(arr)
print("~~~~~")
print(A*B)
print("~~~~~")
print(np.dot(A,B))
print("~~~~~")
print(A-B)
print("~~~~~")
print(C+D)
print("~~~~~")
print(np.dot(M,N))


